<?php echo $header; ?>
<div id="content">
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <div class="box">
    <div class="heading">
      <h1><img src="view/image/category.png" alt="" /> <?php echo $heading_title; ?></h1>
    </div>
    <div class="content">
        <table class="list">
          <thead>
            <tr>
              <td width="1" style="text-align: center;">ID</td>
              <td class="left">Route</td>
              <td class="right">Operation Time</td>
              <td class="right">UserName</td>
              <td class="right">OperationType</td>
              <td class="right">Content</td>
            </tr>
          </thead>
          <tbody>
            <?php if ($logs) { ?>
	            <?php foreach ($logs as $log) { ?>
	            <tr>
	              <td style="text-align: center;"><?php echo $log['id']; ?></td>
	              <td class="left"><?php echo $log['route']; ?></td>
	              <td class="right"><?php echo $log['op_time']; ?></td>
	              <td class="right"><?php echo $log['username']; ?></td>
	              <td class="right">
	              	<?php 
	              		if(1==$log['type']){
	              			echo "INSERT";
	              		}elseif (2==$log['type']){
	              			echo "EDIT";
	              		}elseif (3==$log['type']){
	              			echo "DELETE";
	              		}else{
	              			echo $log['type'];
	              		}
	              	?>
	          	  </td>
	              <td class="left"><?php echo "<pre>";print_r(json_decode($log['content'],true));echo "</pre>"; ?></td>
	              
	            </tr>
	            <?php } ?>
            <?php } ?>
          </tbody>
        </table>
      </form>
      <div class="pagination"><?php echo $pagination; ?></div>
    </div>
  </div>
  </div>
<?php echo $footer; ?>